
#pragma once

#include <Windows.h>
#include <windowsx.h>
#include <gl/gl.h>
#include <gl/glu.h>
#include <gl/glext.h>
#include <mmsystem.h>
#include <stdio.h>
#include <Transform.h>	
#include <Window.h>
#include <GLInfo.h>
//#include <VBO.h>


typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, int size, const GLvoid *data, GLenum usage);

class Application
{

private:
	double mCurrentTime;
	double mLastTime;
	GLInfo mGLInfo;
public :

	float mDeltaTime;
	Window *mWindow;
	HINSTANCE mHinstance;
	bool *mKeys;
	bool mIsMouseLButtonDown;
	POINT mMouseCurPosition;
	bool mIsMouseMoving;

	Application();
	~Application();
	bool CreateGLWindow(HINSTANCE inHinstance, WNDPROC WndProc);
	LRESULT CALLBACK WndProc(HWND inHwnd,UINT inUmsg,WPARAM inWparam, LPARAM inLparam);
	GLvoid ReSizeGLScene(GLsizei inWidth, GLsizei inHeight);
	void UpdateMousePosition();
	void Initialize(HINSTANCE hInstance);
	void UpdateDeltaTime();
	GLvoid KillGLWindow();
};

